package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcInformType;
import com.visizen.wisdomclass.server.model.WcInformTypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcInformTypeMapper {
    @SelectProvider(type=WcInformTypeSqlProvider.class, method="countByExample")
    int countByExample(WcInformTypeExample example);

    @DeleteProvider(type=WcInformTypeSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcInformTypeExample example);

    @Delete({
        "delete from wc_inform_type",
        "where TYPE = #{TYPE,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer TYPE);

    @Insert({
        "insert into wc_inform_type (TYPE, NAME, ",
        "DESCIPTION)",
        "values (#{TYPE,jdbcType=INTEGER}, #{NAME,jdbcType=VARCHAR}, ",
        "#{DESCIPTION,jdbcType=VARCHAR})"
    })
    int insert(WcInformType record);

    @InsertProvider(type=WcInformTypeSqlProvider.class, method="insertSelective")
    int insertSelective(WcInformType record);

    @SelectProvider(type=WcInformTypeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="TYPE", property="TYPE", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="NAME", property="NAME", jdbcType=JdbcType.VARCHAR),
        @Result(column="DESCIPTION", property="DESCIPTION", jdbcType=JdbcType.VARCHAR)
    })
    List<WcInformType> selectByExample(WcInformTypeExample example);

    @Select({
        "select",
        "TYPE, NAME, DESCIPTION",
        "from wc_inform_type",
        "where TYPE = #{TYPE,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="TYPE", property="TYPE", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="NAME", property="NAME", jdbcType=JdbcType.VARCHAR),
        @Result(column="DESCIPTION", property="DESCIPTION", jdbcType=JdbcType.VARCHAR)
    })
    WcInformType selectByPrimaryKey(Integer TYPE);

    @UpdateProvider(type=WcInformTypeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcInformType record, @Param("example") WcInformTypeExample example);

    @UpdateProvider(type=WcInformTypeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcInformType record, @Param("example") WcInformTypeExample example);

    @UpdateProvider(type=WcInformTypeSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcInformType record);

    @Update({
        "update wc_inform_type",
        "set NAME = #{NAME,jdbcType=VARCHAR},",
          "DESCIPTION = #{DESCIPTION,jdbcType=VARCHAR}",
        "where TYPE = #{TYPE,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(WcInformType record);
}